Current sensing in a two-phase motor

ABSTRACT

A method and apparatus for measuring current by a single sensor for two motor phases driven by first and second set of switches to drive respective first and second phases of a motor under control of PWM signals. A first step  100  includes reading a duty cycle of each winding drive current. A next step configures  104, 110, 114, 116, 118  the PWM signals to provide at least one timing window wherein at least of one of the windings of the motor is being driven while the other winding is not being driven, and to provide a relative timing offset of approximately one-half cycle between the pulse width modulation signals driving a first winding and a second winding of the motor. A next step  90  includes gating the switches with the configured PWM signals. A next step  95  includes sampling the current of the at least one of the windings with a single sensor.

The present application is a divisional application of, and claimspriority and full benefit under 35 U.S.C. § 120 of previous U.S. patentapplication Ser. No. 10/889,490, for “Current Sensing In A Two-PhaseMotor”, filed Jul. 12, 2004, and assigned to Motorola, Inc., and whichis incorporated herein by reference in its entirety.

FIELD OF THE INVENTION

This invention in general relates to two-phase power devices (such astwo-phase motors) and, more particularly, to an improved procedure formeasuring the currents in each phase of a two motor phases via a singlecurrent sensor.

BACKGROUND OF THE INVENTION

A two-phase motor (such as a permanent magnet synchronous motor andinduction motor) can be used in many applications to provide powerassistance to mechanical systems. It is known to control the phasewinding voltages in a two-phase motor using pulse width modulatedsignals. The pulse width modulated signals are applied to an inverter ora series of switching devices that connect the phase windings of themotor to a positive and negative terminal of a direct current (DC) powersupply, such as a battery. This inverter consists of four switches in anupper bank and four switches in a lower bank.

To adequately control the motor and minimize torque ripple, it isnecessary to measure the current flowing through each phase winding. Thecurrent measured in each phase is provided to a controller thatgenerates the pulse width modulated signals. To measure currents, it isknown to use a resistor in series with each phase winding. The voltagedrop across each resistor is measured to determine the current flowingfor each phase. This type of system has the disadvantage of requiringtwo current sensors, one for each of the two phase windings, and twomeasurement circuits. These existing configurations use either HallEffect sensors or shunts, which are expensive. Moreover, Hall Effectsensors have differing response characteristics due to sensor accuracy,amplification offset, gain and linearity, and temperature and agingdrift, which will cause a mismatch between the two current channelswhich generates torque ripple. This is also true for shunts or any othercurrent sensor that requires an amplification stage. Further, there isan issue with common-mode noise rejection in two-phase motors that isnot addressed.

It is also known to use a single resistor to perform the function ofmeasuring the current through each phase of a Y-connected three-phasemotor. The single resistor is located external to the motor windings onthe DC link between the DC power supply and the inverter or series ofswitching devices. Depending on the states of the switches and period ofoperation, the currents through the phases may be measured or calculatedby the single resistor. Specifically, in a Y-connected three-phasemotor, the sum of all currents flowing through all phases of the motorare zero, so by knowing the current flowing through one or two phases adetermination of the current flowing through the remaining phase(s) maybe made (with the exception of Y-connected motors with a grounded centerpoint or a motor with a fault). However, this solution is not applicableto two-phase motors without a common winding connection.

It is also known to close either the upper bank of switching devices orthe lower bank of switching devices, thereby recirculating the currentin the windings of the motor together when damping or braking isrequired. Braking is used to damp unwanted mechanical systemoscillations and is also used to reduce the speed of the mechanicalsystem. For example, mechanical resonances or disturbances may feed backinto the motor from the mechanical system. Not only are unstablemechanical resonances undesired by themselves, these resonances cangenerating an electromotive force (EMF) that can result in excesscurrent in the motor. In damping mode, the closed switches allow currentto circulate within the motor windings to act as a brake to oppose anymotion induced by the mechanical resonances, thereby helping to restorestability. However, the internal circulation of currents within themotor windings in this mode cannot be measured by a single externalresistor since the resistor is not in a current carrying loop.Therefore, the currents within the motor windings cannot be measured,and therefore cannot be modified or controlled.

Recent advances in digital signal processors (DSPs) have permitted theuse of more advanced pulse width modulation schemes such as space vectorpulse width modulation (hereinafter “SVPWM”). One significant advantageof using SVPWM in a 3-phase system is that it can provide more outputvoltage compared to conventionally known sinusoidal pulse widthmodulation schemes. The drawback, however, is that SVPWM requires morecomplex schemes to generate PWM signals applied to the inverter. Themain challenge into measuring full phase currents via a single DC linkcurrent sensor is that there are situations where the full phasecurrents cannot be sampled during SVPWM operation. One situation is whenthe amplitude of the voltage space vector is very small. Anothersituation is when the voltage space vector falls on the other activevector.

Therefore, a need exists for an improved technique to monitor current ina two-phase device, using a single current sensor. It would also be ofbenefit if common-mode noise rejection can be provided. Further, itwould be desirable to provide this technique with no additional hardwarerequirements, thereby improving reliability and saving cost.

BRIEF DESCRIPTION OF THE DRAWINGS

The features of the present invention, which are believed to be novel,are set forth with particularity in the appended claims. The invention,together with further objects and advantages thereof, may best beunderstood by making reference to the following description, taken inconjunction with the accompanying drawings, in the several figures ofwhich like reference numerals identify identical elements, wherein:

FIG. 1 is a diagram of a system having a power source, an inverter orswitching circuit, and a two-phase motor, in accordance with the presentinvention;

FIG. 2 is a table reflecting the different possible switching states ofthe switches of FIG. 1;

FIG. 3 is a voltage space vector diagram of FIG. 2;

FIG. 4 is a graphical representation of a prior art PWM switching schemefor a two-phase motor;

FIGS. 5-10 are graphical representation of various PWM embodiments, inaccordance with the present invention;

FIG. 11 is a flow chart for measuring current of a two-phase motor, inaccordance with the present invention; and

FIG. 12 is a graphical representation of another PWM embodiment, inaccordance with the present invention.

While the invention is susceptible to various modifications andalternative forms, specific embodiments have been shown by way ofexample in the drawings and will be described in detail herein. However,it should be understood that the invention is not intended to be limitedto the particular forms disclosed. Rather, the invention is to cover allmodifications, equivalents and alternatives falling within the broadscope of the invention as defined by the appended claims.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

What is described is an improved procedure for measuring the electriccurrent flowing through each phase of a two-phase device in a system,using a single external current sensor. Advantageously, no additionalhardware is needed to implement the invention. Because the sensor islocated in the DC link current path, there is no common-mode noiserejection issue. Two-phase motors, such as permanent magnet synchronousmotors, may be used as part of a powered mechanical system. For purposesof illustration and description, an example of an application of theprocedure for a two-phase motor for automotive uses will be used.Two-phase motors, such as permanent magnet synchronous motors, may beused as part of a power steering system in an automobile. The presentinvention, however, is not limited to two-phase motors and may beapplicable to other two-phase devices or even multi-phase devices notsharing a common winding connection, such as two DC motors, for example.

Now, turning to the drawings, an example use of a system for a two-phasemotor will be explained. Referring to FIG. 1, there is a system 20having generally a power source 22, an inverter or switching circuit 24,and a motor 26. For automotive use, the power source 22 may be anautomobile DC battery having a positive terminal 28 and a negativeterminal 30. The negative terminal 30 may also be a ground connection.The motor 26 may be a motor having two uncoupled phase windings W1 andW2 driving the motor ninety degrees out of phase, although it should berecognized that each winding may include a plurality of poles and couldalso drive the motor at various angular relationships. It should also berecognized that the present invention can also be applied to multiplewinding motors not sharing a common connection or neutral. Such motorsmay include, for example, a permanent magnet synchronous motor or aninduction motor.

The inverter or switching circuit 24 includes four sets of switchingdevices, one set for each end of each phase winding of the motor 26. Afirst set of switching devices Sah (switch A high), Sal (switch A low)are capable of providing a voltage Va to one side the first phasewinding W1, and a second set of switching devices Sbh (switch B high),Sal (switch B low) are capable of providing a voltage Vb to the otherside the first phase winding W1. The drive to winding W1 is then Va−Vb,or Vab. Similarly, a third set of switching devices Sch (switch C high),Scl (switch C low) are capable of providing a voltage Vc to one side thesecond phase winding W2, and a fourth set of switching devices Sdh(switch D high), Sdl (switch D low) are capable of providing a voltageVd to the other side the first phase winding W2. The drive to winding W2is then Vc-Vd, or Vcd. Both upper and lower devices on the same inverterleg are not allowed to turn-on simultaneously to prevent shoot-throughcurrent. For example, Sah (switch A high) and Sal (switch A low) arenever turned on together. Typically, the amplitude of Va and Vc (or Vband Vd) is about V_batt when the corresponding upper device is turn-onand 0V when the corresponding lower device is turn-on. Therefore, theamplitude of Vab and Vcd are about either V_batt or zero volts. Theamplitude of Vab and Vcd shown in the figures is just an example. For a2-phase AC motor, the 2 windings have been driven by sinusoidalvoltages.

Each set of switching devices has an upper bank of switching device Sah,Sbh, Sch, Sdh connected to the positive terminal 28 of the power source22 and a lower bank of switching device Sal, Sbl, Scl, Sdl connected tothe negative terminal 30 of the power source 22. Each switching deviceis independently driven by a PWM controller 34. The opening and closingof switching devices within each set allows each end of phase winding W1and W2 of the motor 26 to be connected to a positive terminal 28 or anegative terminal 30 of the power supply 22. This permits a voltage Vabor Vcd to be applied to a corresponding phase winding W1 or W2 of themotor 26, respectively. The current flowing through each phase windingW1 or W2 is represented in FIG. 1 by a corresponding variable i1 or i2,respectively.

As will be explained in more detail below, the present invention usesSVPWM signals to control the switching devices. The PWM controller 34 isused to generate a PWM signal to each of the switching devices. Thecontroller 34 generates the PWM signal based on the current measurementsprovided by a current sensor 32. It should be recognized that thecurrent sensor 32 can be associated with amplifiers, sample & holdcircuitry, analog-to-digital converters, and the like in order toprovide an analog or digital signal to the controller indicating acurrent in the measured phase of the motor 26. The controller 34 caninclude a digital processor and memory to store software having controlalgorithms. The digital processor supplies the PWM signals based thecontrol algorithms implemented in software. A suitable controller 34having a digital processor for the present invention may be obtainedfrom Motorola, Inc. as part of the 56F83xx family, for example. The partis a digital signal processor (DSP) controller that includes flashmemory to store software. Alternatively, the controller 34 could includea DSP processor with an external memory (not shown).

A variety of switching devices can be used for the switching circuit 24.For example, the switching devices can be power transistors such asIGBT, power MOSFET, and bipolar transistor. The PWM signals would thenbe applied to the gates or bases of the power transistors. What isimportant is that each switching device is capable of being opened orclosed (or turned off or on) by applying a PWM signal. The switches aregenerally controlled by a PWM signal but most important, they aregenerating the PWM phase voltage to the motor windings.

To adequately control the motor 26 and minimize torque ripple, thecurrents for variables i1 and i2 need to be measured or otherwise known.In one embodiment, the single current sensing device 32 is positioned onthe DC link between the power supply 22 and the switching circuit 24. Inparticular, the current sensing device 32 is located between the lowerswitching devices Sal, Sbl, Scl, Sdl of the switching circuit 24 and thenegative terminal 30 of the power supply 22. The current sensing device32 may be a sensor that measures the voltage drop across a resistor. Thecurrent sensing device 32 may be capable of converting the measuredvoltage drop to a current (represented by i_dc_link) through the DC linkaccording to well-known methods. The current sensor 32 can be on thenegative rail (as shown) or on the positive rail. Alternatively, themeasured voltage drop from sensor 32 may be provided to the controller34 and the controller 34 may convert the sensed voltage drop to acurrent.

Each switching device within a high and low set of switching devices iscomplementary to the other switching device. For example, voltage Va atone end of winding W1 may either be ON, by directing switch Sah toconduct while directing Sal to stop conducting, or OFF by directingswitch Sah to stop conducting while directing Sal to start conducting.Voltage Vb, Vc and Vd are controlled in the same manner. However, all ofthe voltages Va, Vb, Vc and Vd can be operated independently of eachother.

For a two-phase motor system, this results in sixteen possible switchingstates. The table illustrated in FIG. 2 reflects the sixteen possibleswitching states as vectors. The first column in the table representsthe states (open/closed) of the first set of switching devices Sah, Sal.The second column in the table represents the states (open/closed) ofthe second set of switching devices Sbh, Sbl. The third column in thetable represents the states (open/closed) of the third set of switchingdevices Sch, Scl. The fourth column in the table represents the states(open/closed) of the third set of switching devices Sdh, Sdl. The fifthand sixth columns reflect the sixteen vector states. The seventh columnreflects the relationship between the current through the DC link(i_dc_link) and the currents i1 and i2 through the phase windings W1 andW2. Out of the sixteen possible switching states, there are twelveactive vector states where current will flow through the DC link andfour zero vector states (0000, 1100, 0011, 1111) where little or nocurrent will flow through the DC link and only a DC offset current willbe registered. As can be seen there are many motor drive states wherethe individual current for Winding W1 or W2 can not be measured on theDC link, but only a combination of the two. For example, vector 1001includes a combination of i1−i2.

The present invention uses PWM signals to control the states of theswitching devices. By controlling the states of the switching devices,desired phase voltages may be applied to the phase windings W1 and W2 ofthe motor.

FIG. 3 shows a typical inverter voltage space vector diagram for PWMoperation. The vector diagram is divided into four sectors I-IV. Whenthe inverter or switching circuit is driving the motor, the voltagespace vector V_(αβ) will rotate at the same speed as the motor. Avoltage space vector will fall within one of the sectors or fall on oneof the active vectors. If the voltage space vector falls within asector, two adjacent vectors are chosen. For example, FIG. 3 illustratesa voltage space vector V_(αβ) falling within sector I. The voltage spacevector V_(αβ) can be represented by two adjacent vectors V1′ and V2′ inthe following relations:V _(αβ) =V1′+V2′  (1)V1′=V1*(t1/Tp)  (2)V2′=V2*(t2/Tp)  (3)

In the above relations, t1 is a first time period during which vector V1is applied; t2 is a second time period during which vector V2 isapplied; and Tp is a full pulse width modulated cycle or period(typically fifty microseconds). The amplitude of the voltage spacevector V_(αβ) can be described by a modulation index.

Referring to FIG. 4, a timing diagram is shown for naturally symmetricPWM signals. Each timing diagram shows the voltage pulse trains appliedto the switching devices to produce voltages Va, Vb, Vc, Vd on thewindings W1, W2 of the motor that correspond to the two phases of themotor over a single pulse width modulation cycle or period Tp. The pulsetiming can be driven by a simple ramp signal 40 that operates on variousthresholds 42. For example, a Vc threshold on a downward ramp signalwill apply the voltage Vc, and the same Vc threshold on an upward rampsignal will remove the voltage Vc. Thresholds Va, Vb and Vd worksimilarly in this symmetric manner. In this example, winding W1 is idleacross the period, i.e. Vab=0 (Va−Vb=0), and winding W2 is being drivenby a positive voltage Vcd over two quarters of the period Tp.

In pulse width modulation schemes, the pulse width modulated signal isnot constant. Rather, the signal is on for a part of the period and offfor another part of the period. In FIG. 4, the high state of the voltagepulse train indicates that an upper switching device Sah, Sbh, Sch, Sdhis closed (and a corresponding lower switching device Sal, Sbl, Scl, Sdlis open by a corresponding opposite voltage pulse train (not shown)).The low state of the voltage pulse train indicates that an upperswitching device Sah, Sbh, Sch, Sdh is open (and a corresponding lowerswitching device Sal, Sbl, Scl, Sdl is closed by a correspondingopposite voltage pulse train (not shown)). The patterns of the voltagepulse trains are symmetrical to a center axis that represents a halfpulse width period tp.

At the bottom of FIG. 4, the corresponding vectors (from FIG. 2) areshown. In this example, any of sample points S1-S4 can be taken todetermine current i2 in winding W2 (at vector 0010 or vector 1110), butit is not possible to independently find the current i1 in winding W1inasmuch as none of the vectors contain i1 solely. Indeed, during thevectors 0000 and 1111 there is no current is passing through DC link(zero vector states). However, in half the time period Tp the activevector V2 is applied. In other words, a current will pass through the DClink during the vectors 00010 and 1110. If the time period of vector0010 or 1110 is sufficiently long enough, a current through thecorresponding winding may be measured or sampled (S1-S4). Typically, thetime period necessary to obtain an accurate sample measurement is abouttwo microseconds, preferably taken in the middle of the pulse width.Therefore, a sampling window of about four microseconds is desired

FIG. 5 shows one solution to the problem of obtaining both i1 and i2measurements involving shifting of the pulse train. This can beaccomplished by manipulating then switching thresholds for Va and Vbduring the PWM cycle as shown. For example, threshold Va1 is used toapply voltage Va, and threshold Va2 is used to remove voltage Va.Similarly, threshold Vb1 is used to apply voltage Vb, and threshold Vb2is used to remove voltage Vb. In this case, a sample S1 can be takenduring vector 1000 (or sample S3 during vector 0111) to determine i1 andsamples S2 or S4 can be taken to determine i2 as before. However, it isvery difficult to manage the four PWM outputs and changing thresholds inthis solution.

FIGS. 6 and 7 show a further solution to mitigate the problems inherentin the solution of FIG. 5, by using a phase grounding approach (FIG. 6)and then introducing small active states (FIG. 7) for measurement. Phasegrounding is to choose vector 0000 for zero-vector synthesis byturning-on the corresponding lower devices. The advantage of this is thereduction of switching and the switching losses inherent therein. Inaddition, any coupling interaction between windings is reduced and thereis no need to use a gate drive with 100% duty cycle capability. As shownin FIG. 6 (and referencing FIG. 4), the only non-zero active vector isVc. Other vectors Va, Vb and Vd are zero vectors. As a result, Va, Vband Vd are at virtual grounds (i.e. phase grounding), but the drive tothe motor is essentially the same as shown in FIG. 4. However, it isstill necessary to change switching thresholds during the PWM cycle.Therefore, it is desirable to merge the Vc ON states into one (arrows),wherein a single Vc threshold can be maintained for the ramp signal, andthe amount of switching is minimized. As before, i2 can again be sampledat S1, but i1 still can not be sampled.

After phase grounding, one or more vectors can be artificiallyintroduced to measure i1 as shown in FIG. 7. In this case two vectorsare introduced within the 0010 vector (resulting after the merging ofthe Vc ON states) of FIG. 6. The two introduced vectors are of a minimaltime period (e.g. four microseconds) that is sufficient to provide anaccurate measurement. As shown for sample S2, Va is turned on (Vb off)to drive a current i1 through W1 so that a sample can be measured.However, as shown in FIG. 2, just turning Va ON would result in a 1010vector, which does not isolate i1. However, it can be noticed that a1011 vector will isolate i1 for measurement. Therefore, Vd can be turnedon for the sample S2. This can be done as long as the Vc ON time isspread out such that the total ON time for Vcd (Vc−Vd) remains the same.During sample S2 current +i1 is introduced into winding W1. In order tobalance this out, so that an intended average Vab=0 state is maintainedthrough the cycle, an equivalent −i1 current is introduced (shown assample S3). In this case, Va is switched OFF (by the change from adownward to upward ramp indication), Vb is switched ON (also by thechange from a downward to upward ramp indication), while Vd is left ON,with the resulting 0111 vector providing a −i1 current in winding W1. Asa result, i1=(S3+S2)/2. As long as Vcd is ON for the same amount asFIGS. 4 and 6, this representation is substantially equivalent. SamplesS1 or S4 can be used as before to measure i2. However, in this exampleit should be noted that there is much sampling and switching to be doneduring a very short time, which can introduce coupling effects betweenwindings and switching problems.

Therefore, in a preferred embodiment, the active states and samplingbetween the windings are removed from each other. This can be done byproviding two PWM ramp signals that are separated by 180 degrees, asshown in FIG. 8. This embodiment has several advantages. First, only oneW2 active vector is needed which reduces switching losses. Second, theactive states are well separated which not only reduces potentialwinding coupling, but also leaves room for the active vectors to widen(as motor drive requires) without interacting, i.e. increase dynamicrange. In addition, the sampling points can remain fixed. As a result,this embodiment provides accurate two-phase motor measurements with asingle current sensor for all the light and medium duty-cyclerequirements for a two-phase motor. Although the special case of anaverage Vab=0 is shown (W1 is substantially idle), it should berecognized that if W1 is being driven, which is the typical case, theni1 can still be easily measured away from i2 (as represented in FIG. 9below) as long as the W1 and W2 states do not overlap. In heavy loadrequirements, the active states of the windings may extent to most orall of the duty cycle of the PWM cycle, i.e. the drive voltage to one orboth windings may be forced ON for most or all of the PWM cycle causingthe active states to overlap. In this case, the solution of FIG. 8 maynot be able to provide the isolated current measurement of each winding.

FIG. 9 shows the two-phase motor under heavy load with overlappingactive states (both ramps shown together). In the example shown, W2 isbeing driven for a large majority of the duty cycle. As long as W2 isoff for a sufficient amount of time for sample S2 (at least fourmicroseconds), then i1 can be accurately measured during vector 1000,and i2 can be measured anytime during sample S4. However, if the periodfor sample S2 is less than sufficient (e.g. four microseconds), then anaccurate measurement for i1 can not be made. However, even in this heavyload embodiment, the present invention provides a technique where i1 canstill be determined. Specifically, the sum current of i1+i2, due toapplied vector 1010, can be measured at either sample point S1 or S3.Since i2 can be determined at S4, i1 can then be calculated fromi1=S1−S4 or i1=(i1+i2)−i2.

It should be noted it is undesirable for both motor windings to bedriven at 100% duty cycle as motor saturation occurs and the PWM systemcan no longer provide proper control of the motor. Therefore, it ispreferred that the motor control algorithm will limit voltage output toguarantee that both active voltage vectors cannot be at 100% duty cycle.Specifically, the system provides that at least one of the windings willbe driven at less than 100%, and preferably 100%−the minimum samplingwindow (i.e. fifty microseconds−four microseconds=forty-sixmicroseconds), which will be referred herein after as Wmax. The minimumsampling window will hereinafter be referred to as Wmin.

Similarly, problems may occur when using PWM signals if the time periodsfor either (or both) of the sample periods for the active vectors arevery small or nonexistent. When the sample periods for the activevectors are very small or nonexistent, the system is not able to measurethe currents through at least two phases of the windings in the motor.FIG. 10 shows the very-light load case where one of the windings ispowered for a very short time (e.g. less than four microseconds),wherein an accurate sample can not be obtained. In this case somethingsimilar to the embodiment for FIG. 7 can be used wherein one of thevectors (0010) is widened while an artificial vector (0001) isintroduced, by driving Vd, to balance out the current inequity caused bywidening the short vector.

For the example shown in FIG. 10, if it is assumed that the Vc ON timefor active state vector 0010 is only three microseconds, then it isknown that an accurate sample for S3 can not be obtained. One solutionwould be to spread the Vc ON time for another one microsecond (arrow)and apply a balancing one microsecond Vd On time (shown as sample S4.However, it is very difficult to control a one microsecond pulse in thePWM system. It is preferred that Vd ON time is also at least fourmicroseconds for better control. This then requires that the sample S3be spread not an addition one microsecond, but an additional fourmicroseconds (seven microseconds total). Not only does this provide morestable operation, the presence of the new 0010 and 0001 vectors allowsat least two samples (S2, S4) to be taken and averaged for a moreconsistent measurement result for current i2.

As can be realized, there are many possible scenarios for driving atwo-phase motor relating to the active vectors for W1 and W2.Accordingly, the present invention takes into account these differentcases. As explained in more detail below, depending on the specificcase, the PWM signals are applied in certain ways to allow a sufficientsampling window (or time period) for measuring a current across thesensor on the DC link. In order to ensure sufficient sampling window forvalid DC-link current measurement, each case is identified and thenappropriate shifts or modifications to the PWM signals are made by thecontroller of the system based on the identified case.

In all of the above embodiments, the 0000 vector or zero voltage vectorcan be measured for zero-amp calibration and to take into accountresistor and amplifier temperature coefficient drift.

Generally, and referring to FIG. 11, the present invention describes amethod for measuring the current in each phase of a two-phase motor by asingle sensor, the motor being controlled by a plurality of switchingdevices that receive pulse width modulation signals from a controller. Afirst step 80 includes providing two ramp signals for a pulse widthmodulation controller for controlling the switches. The ramp signalsbeing approximately one half cycle out of phase, with the first rampsignal for controlling the first set of switches and the second rampsignal for controlling the second set of switches. The dual ramp signalsensure that the distribution of pulses used to control one winding areapproximately one-half of a PWM cycle away from the pulse distributionfor the other winding.

A next step 90 includes gating the first and second set of switchesusing the respective ramp signals. This results in a first voltage pulsetrain Vab, and second voltage pulse train Vcd associated with the twowindings W1, W2 of the motor, respectively. The Vab and Vcd pulse trainsprovide a relative timing offset of approximately one-half cycle betweenthe pulse width modulation signals driving the first and second windingsof the motor.

A next step includes the reading 100 a modulation index (i.e. dutycycle) for the pulse width modulation signals for one pulse widthmodulation cycle from a motor drive control. In other words, this stepreads a first duty cycle of a first drive signal for the first windingand a second duty cycle of a second drive signal for the second winding.The method then uses the modulation index to determine how to when andhow to modify the voltage pulse trains. First and second samplingwindows are time periods defined within pulse train of the cycle thatmay allow certain current measurements to be taken. Preferably,measurement samples are taken in the middle of a sampling window. Foradequate current measurement, these windows should be greater than aminimum window, Wmin. For control purposes, at least one of thesewindows should be less than 100%−Wmin, or Wmax. A next step includesconfiguring 104, 110, 114, 116, 118 the timing of the pulse widthmodulation signals to provide at least one timing window wherein atleast of one of the windings of the motor is being driven while theother winding is not being driven, such that a single current sensor cansample the current of the at least one of the windings during the atleast one timing window.

In a first embodiment 104, when both the first and second samplingwindows are less than the minimum sampling window (resulting in nooverlapping) 102, artificial voltage vectors are introduced to add tothe sampling period for both Vab and Vcd to provide sufficient samplingtime. For example, for Vab, artificial and adjacent vectors 1000 and0100 vectors are introduced to provide at least one sample for i1 (aswas demonstrated for Vab in FIG. 8). This is also the case where Vab isnon-existent (Vab has zero duty cycle), with artificial vector 1000being added to the existing 1000 vector and vector 0100 being placedadjacent (similar to what was demonstrated for Vcd in FIG. 10). For Vcd,artificial and adjacent vectors 0010 and 0001 vectors are introduced toadd to the sampling period to provide at least one sample for i2(similar to what was demonstrated for Vab in FIG. 8). This is also thecase where Vcd is non-existent (Vcd has zero duty cycle), withartificial vector 0010 being added to the existing 0010 vector andvector 0001 being placed adjacent (as was demonstrated for Vcd in FIG.10).

In a second embodiment 110, when both sampling windows are greater thanWmin 106, and both sampling windows are less than Wmax 108, noartificial vectors need be introduced since i1 and i2 are isolated andcan be sampled individually. For example, for Vab, i1 can be sampledduring vector 1000 (as was demonstrated for Vab in FIG. 10), and forVcd, i2 can be sampled during vectors 0010 (as was demonstrated for Vcdin FIG. 8).

In a third embodiment 114, when both sampling windows are greater thanWmin 106, and the first sampling window is greater than Wmax, and thesecond sampling window is less than Wmax 108, the current of the firstsample can not be obtained, but the current of the second sample can beobtained by itself. In this case, the first sample will contain the sumof the winding currents, and the second current is subtracted from thissum to obtain the first current (as was demonstrated in FIG. 9).

In a fourth embodiment 116, when the first sampling window is less thanWmin, and the second sampling window is greater than Wmin 106, and bothsampling windows are less than 100%−3*Wmin (hereinafter Wmax3) 112, thanartificial vectors are introduced for the first sampling window (e.g.Vcd) to provide sufficient sampling time. For example, for Vcd,artificial, extended (3×), and adjacent vectors 0010 and 0001 vectorscan be introduced to add to the sampling period to provide at least onesample for i2 (as was demonstrated for FIG. 10). For Vab, artificial,extended (3×), and adjacent vectors 1000 and 0100 vectors can beintroduced to add to the sampling period to provide at least one samplefor i1 (as was demonstrated for Vcd in FIG. 10).

In a fifth embodiment 118, when the first sampling window is less thanWmin, and the second sampling window is greater than Wmin 106, and atleast one of the sampling windows is greater than 100%−3*Wmin 112, thenartificial vectors are introduced for the first sampling window (e.g.Vcd) to provide sufficient sampling time. For example, for Vab less thanWmin, artificial and adjacent vectors 1011 and 0111 vectors areintroduced to add to the sampling period to provide at least one samplefor i1 (as was demonstrated for FIG. 7 wherein the W2-11 vector isintroduced along with the two active W1 vectors). This is subtractedfrom the second sample, which contains the sum of the currents, toobtain the sample for i2. As shown in FIG. 12, i1=((S1−i2)−(S2−i2))/2 soi1=(S1−S2)/2. Alternatively, another option is to create a sub-casewhere the W2 null vector (11) is aligned with only one of the twointroduced W1 vectors.

In a preferred embodiment, the present invention also provides techniquefor abnormal operation for the motor. For example, if one of thewindings is shorted (or the associated switches shorted) and turned OFF,breaking torque for the motor will come from free-wheeling,recirculating current only. However, it will still be possible to usethe common shunt current sensor to read the current from the other goodwinding. In addition, is desirable that the controller incorporate delaycompensation between the controller and the power stage. This willprovide compensation for the propagation delay between these stages.

After one of the above embodiments is performed, depending on thedetermined duty cycle, a next step 90 includes gating the first andsecond set of switches using the respective ramp signals in accordancewith the modifications of selected embodiment above. A final step 95includes sampling the current in at least one of the windings in thedefined sampling windows to determine the current in both windings, asdetail previously.

What has been described is an improved procedure for measuring currentflowing in a two-phase device with a single current sensor external tothe motor. The above-described procedure modifies existing PWM operationbased on specific cases. The procedure involves monitoring currents in amotor phase over very short periods. It should be recognized thatswitching devices other than FETs can be used. However, in that case,external diodes are added to replicate FET body diodes so that theoperation of the present inventions is the same as that with FETs.

The above description of the present invention is intended to beexemplary only and is not intended to limit the scope of any patentissuing from this application. For example, the present discussion useda two-phase motor. The present invention is also applicable to otherseparate devices, two-phase devices, or multi-phase devices where pulsewidth modulation is used. The present invention is intended to belimited only by the broad scope of the following claims.

1. A method for measuring current by a single sensor for a two-phasemotor, drive current to the two phases switched by a first set of upperand lower switches to drive a first phase of a motor and a second set ofupper and lower switches to drive a second phase of a motor, with theswitches being controlled by a plurality of pulse width modulationsignals, the method comprising the steps of: reading a duty cycle ofeach drive current to a respective winding; providing two ramp signalsfor a pulse width modulation controller for controlling the switches,the ramp signals being approximately one half cycle out of phase, thefirst ramp signal for controlling the first set of switches and thesecond ramp signal for controlling the second set of switches;configuring the pulse width modulation signals to provide at least onetiming window wherein at least of one of the windings of the motor isbeing driven while the other winding is not being driven, and to providea relative timing offset of approximately one-half cycle between thepulse width modulation signals driving a first winding and a secondwinding of the motor; gating the first and second set of switches usingthe respective ramp signals from the configuring step; and sampling thecurrent of the at least one of the windings during the at least onetiming window.
 2. The method of claim 1, wherein the configuring stepincludes determining whether the first and second duty cycles are bothless than a minimum sampling period, wherein artificial voltage vectorsare introduced to provide sufficient sampling time for at least one ofthe sampling windows.
 3. The method of claim 1, wherein the configuringstep includes determining whether the first and second duty cycles aregreater less than a minimum sampling period and less than a maximumsampling window, wherein each sampling window can be sampled to provideisolated currents for respective windings.
 4. The method of claim 1,wherein the configuring step includes determining whether the first andsecond duty cycles are greater less than a minimum sampling period andonly the second duty cycle is less than a maximum sampling window,wherein a first sampling window is sampled for a sum of the first andsecond winding currents and the second sampling window is sampled forthe isolated second winding current, which is subtracted from thesampled sum to obtain the first winding current.
 5. The method of claim1, wherein the configuring step includes determining whether only afirst duty cycle is less than a minimum sampling period and both dutycycles are less than 100%−(3*the minimum sampling period), whereinartificial active voltage vectors are added to the first sampling periodto obtain the first winding current.
 6. The method of claim 1, whereinthe configuring step includes determining whether only a first dutycycle is less than a minimum sampling period and at least one of theduty cycles are less than 100%−(3*the minimum sampling period), whereinartificial active voltage vectors are added to the first sampling periodto obtain the first winding current, which is subtracted from the secondsample that includes a sum of the two currents, to obtain the secondwinding current.